package com.property.manage.controller.home;

import com.guardchina.framework.mybatis.model.CustomPage;
import com.property.manage.model.fee.CollectionVo;
import com.property.manage.model.home.HomeVo;
import com.property.manage.model.owner.OwnerCountVo;
import com.property.manage.service.fee.CollectionService;
import com.property.manage.service.home.HomeService;
import com.property.manage.service.owner.OwnerService;
import com.property.manage.service.resource.BuildingService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotNull;

/**
 * 描述
 *
 * @author lwb
 * @since 2020/7/16
 */
@Api(tags = "首页统计接口")
@RestController
@RequestMapping("/home")
@Validated
@AllArgsConstructor
public class HomeController {

    @Autowired
    private HomeService homeService;



    @ApiOperation("统计")
    @GetMapping("/statistics")
    public HomeVo statistics(
            @ApiParam("小区id") @RequestParam(value = "villageId", required = false)Integer villageId){

        return homeService.statistics(villageId);
    }


}
